home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW etc / Miscellaneous / WindowBar / WindowBar ReadMe < prev   
Encoding:
Text File  |  1995-10-11  |  5.0 KB  |  130 lines  |  [TEXT/MPS ]

  1. MPW WINDOW BAR
  2. By Eric Traut
  3. Version 1.0ß3
  4.  
  5.  
  6. **** WHAT IS IT?
  7. Window Bar is a small utility which creates a customizable window
  8. bar in the MPW Shell’s windows. The bar contains button-like icons 
  9. with associated scripts. When a button is pressed, an MPW script is
  10. executed.
  11.  
  12.  
  13. **** REQUIREMENTS
  14. You need a copy of the MPW Shell 3.3 or greater and a machine running 
  15. System 7. You also need a copy of ResEdit to for installation.
  16.  
  17.  
  18. **** HOW TO INSTALL
  19. These instructions assume some knowledge of ResEdit and MPW.
  20.  
  21. The window bar contains a number of components. The first and most
  22. important is a WDEF resource in the file MPWWindowBar.rsrc. Follow
  23. these steps to install the WDEF resource:
  24. 1. Save your original copy of the MPW Shell (just in case)
  25. 2. Open a copy of MPW Shell and the “MPWWindowBar.rsrc” file with ResEdit.
  26. 3. See if there is a WDEF 0 resource in your MPW Shell already.    If 
  27.     you are using a utility such as PopupFuncs, there will be one
  28.     present. If not, go to step 5.
  29. 4. Renumber the WDEF 0 to WDEF 1.
  30. 5. Copy the WDEF 0 resource from MPWWindowBar.rsrc and paste it into
  31.     the shell.
  32. 6. Quit ResEdit, saving all changes.
  33.  
  34. Warning: Do not paste this WDEF into other programs. It will cause
  35. unusual (and perhaps detramental) side-effects.
  36.  
  37. The second part of the window bar is a “prefs” file. Copy the
  38. “WindowBar Icons” into your main MPW directory. It must remain
  39. named “WindowBar Icons” and it must be in the same directory
  40. as the MPW shell to work.
  41.  
  42. Third, copy the file “UserStartup•WindowBar” and the directory
  43. “WindowBarScripts” to your MPW folder. These must also be in the
  44. same directory as the MPW Shell.
  45.  
  46. Finally, copy the two MPW tools “InstallIcon” and “RemoveIcon”
  47. into the MPW Shell’s directory or the “Tool” subdirectory.
  48.  
  49. The installation is now complete. Launch MPW to see the changes.
  50.  
  51.  
  52. **** HOW IT WORKS
  53. The Window Bar is a simple WDEF which overrides the standard system
  54. window definition proc (WDEF 0). It actually does very little itself.
  55. It simply draws the window bar and responds to clicks on window
  56. bar icons. For everything else, it calls the standard WDEF 0. If 
  57. it finds a WDEF 1 installed in the MPW Shell, it calls through to 
  58. that istead. This means that the Window Bar will work with other 
  59. utilties that use a similar stategy such as PopupFuncs.
  60.  
  61. The icons to be drawn are stored as 'cicn' resources in the file
  62. “WindowBar Icons”. If this file is not present or is unreadable, 
  63. the window bar will not be installed.
  64.  
  65. The “UserStartup•WindowBar” gives some examples of how to use
  66. the InstallIcon tool to install icons and their related scripts.
  67.  
  68. When an icon button is pressed, the WDEF sends an AppleEvent to
  69. the MPW Shell to tell it to execute the associated script.
  70.  
  71. All icons and related information are kept in memory after they are
  72. created with the InstallIcon tool.
  73.  
  74. There is a runtime memory overhead of about 2K for the code and
  75. approximately 250 bytes for each icon plus the size of the 'cicn'
  76. resource and the length of the script’s text. Therefore, if you have the
  77. maximum number of icons installed (32) with an average length script
  78. attached to each, your available MPW heap space will decrease by 
  79. about 15K.
  80.  
  81.  
  82. **** MODIFYING THE WINDOW BAR
  83. To modify the appearance or behavior of any of the icons, or to 
  84. add additional icons, use the InstallIcon tool. You can also add
  85. additional icons to the “WindowBar Icons” file. 
  86. When you install an icon, you specify the 'cicn' resource id and
  87. the script to be attached to the icon. You may optionally include
  88. a name for the icon which is handy if you want to remove the icon
  89. by name in the future. You may also optionally include a list
  90. of file suffixes to indicate which types of files the icon should
  91. work with. If you want the icon to only work with files ending 
  92. in “.c”, for example, use the file type string "c". You may also 
  93. enter a list of file suffixes, colon delimited and without spaces. 
  94. For example, to specify assembly, C, C++, and pascal files, 
  95. use the string "a:asm:c:cp:h:p". Note that these suffixes 
  96. are case-insensitive, so the above example would work with 
  97. “Foo.C” as well as “Foo.c”.
  98.  
  99.  
  100. **** DISCLAIMER
  101. This is a beta version. I would appreciate bug reports. I have
  102. tested it using MPW 3.3 on a Quadra 700 with multiple monitors.
  103. It seems to work fine with this set-up, and I know of no reasons
  104. why it shouldn’t work on any machine running System 7. I have not
  105. stress-tested it yet under low-mem conditions, so be careful
  106. there. The author is not responsible for lost data due to crashes
  107. or normal use of this piece of software. Use it at your own risk.
  108.  
  109.  
  110. **** CHANGE HISTORY
  111. version ß1:
  112. This version was slow and very buggy. It was written quickly in a
  113. single night, and it showed.
  114.  
  115. version ß2:
  116. Incorporated many suggestions from friends and coworkers including
  117. using AppleEvents to communicate with MPW.
  118.  
  119. version ß3:
  120. Finished dynamic version of WindowBar including the InstallIcon and
  121. RemoveIcon tools.
  122.  
  123. version ß4:
  124. Fixed two bugs: zoom boxes now work as they should (they didn’t show
  125. up at all in previous versions), and the RemoveIcon tool doesn’t
  126. continually crash now.
  127.  
  128.  
  129.  
  130.